package com.admin.common.enums;

/**
 * 申报状态标记
 */
public enum DeclareStatusEnum {

    WAIT (0, "待标记"),
    SUCCESS(1, "标记通过"),
    NOT_SUCCESS(2, "标记不通过");

    private Integer key;
    private String name;

    DeclareStatusEnum(Integer key, String name) {
        this.key = key;
        this.name = name;
    }

    public Integer getKey() {
        return key;
    }


    public String getName() {
        return name;
    }

    public static String getText(Integer key) {
        if (key == null) {
            return null;
        }
        for (DeclareStatusEnum e : DeclareStatusEnum.values()) {
            if (e.getKey().equals(key)) {
                return e.getName();
            }
        }
        return null;
    }

}
